﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ShivamEMR.Model.Domain.UserDomain;
using ShivamEMR.Model.Domain.CompanyDomain;
using System.ComponentModel.DataAnnotations;

namespace ShivamEMR.Model.Domain.CRMDomain
{
   public class Message
    {
        #region Properties
        public Guid ID { get; set; }
        public DateTime DateAndTime { get; set; }
        public int Priority { get; set; }
        public string Title { get; set; }
        public string Body { get; set; }
        public string Notes { get; set; } 
        #endregion

        #region ForeignKeyProperties
        public Guid FromID { get; set; }
        public int MessageStatusID { get; set; }
        public int MessageGroupID { get; set; }
        public int MessageTypeID { get; set; } 
        #endregion


        #region NavigationalProperties
       [ForeignKey("FromID")] 
       public virtual User From { get; set; }
       [ForeignKey("MessageStatusID")]
       public virtual MessageStatus Status { get; set; }
       [ForeignKey("MessageGroupID")]
        public virtual MessageGroup Group { get; set; }
       [ForeignKey("MessageTypeID")]
        public virtual MessageType Type { get; set; }
       
        public virtual ICollection<User> ForUsers { get; set; }
        public virtual ICollection<Department> ForDepartments { get; set; }
       
        #endregion
    }
}
